package org.adorsys.aderp.aderplogin.client;

import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;

public class ClientAuthority implements GrantedAuthority {

	private static final long serialVersionUID = 1L;
	private final Authentication clientDetails;
	
	public ClientAuthority(Authentication clientDetails) {
		this.clientDetails = clientDetails;
	}

	@Override
	public String getAuthority() {
		return clientDetails.getName();
	}

	@Override
	public String toString() {
		return "ClientAuthority ["+clientDetails.getName()+ "]";
	}

	public Authentication getClientDetails() {
		return clientDetails;
	}
	
	
}
